﻿using SBlogCore.Entitys.SysRoleManager;

namespace SBlogCore.WebAdminApplication.SysRoleManager.Dto
{
    public class SysRoleInfoOptions
    {
        public long Value { get; set; }
        public string? Label { get; set; }
    }
    public class SysRoleInfoOptionsMaps : ISblogCoreMap
    {
        public void MapDo()
        {
            TypeAdapterConfig<SysRoleInfo, SysRoleInfoOptions>.NewConfig()
                .Map(d => d.Value, s => s.Id)
                .Map(d => d.Label, s => $"{s.Name}-{s.Code}");
        }
    }
}
